import {observable, action} from 'mobx';
import {ListAdvanced, ListViewPage, RouteLayout, Share} from 'weaver-mobile-page';
import {Tools} from 'weaver-mobile';

const getLabel = Tools.getLabel;
export default class CollectionListStore {
    @observable showCheck = false;
    @observable moveSignal = false;
    @observable moveId = '';//详情页将要移动的Id
    @observable mode = '';
    @observable selectedDir = getLabel('92', '目录');
    @observable popoverShow = true;
    @observable list = new ListViewPage.Store({route: '/favouriteList'});
    @observable listAd = new ListAdvanced.Store({route: '/favouriteList', id: 'test'});
    @observable layout = new RouteLayout.Store({route: '/favouriteList', id: 'detailpage'});
    @observable share = new Share.Store({route: '/favouriteList', id: 'forward'});
    @observable leftTreeValueArray;
    @observable needRefresh = 0;
    msgList = [];
    msgInfo = {};
    shareParams = {};
    browserConfig = {};
    @observable detailData = {};
    @observable treeBtn = '';
    // 目前搜索历史存放 localStorage，需要指定固定 id

    @action
    changePicker = (str) => {
        this.showPicker = str
    }
    @action
    setState = (params = {}) => {
        Object.keys(params).forEach((key) => {
            this[key] = params[key];
        });
    }

}